package com.ruoyi.inventory.mapper;

import java.util.List;

import com.ruoyi.inventory.domain.TWarehouseStock;

/**
 * 库存Mapper接口
 *
 * @author ruoyi
 * @date 2025-09-24
 */
public interface TWarehouseStockMapper {
	/**
	 * 查询库存
	 *
	 * @param id 库存主键
	 * @return 库存
	 */
	public TWarehouseStock selectTWarehouseStockById(Long id);

	/**
	 * 使用行级悲观锁查询库存记录
	 * @param query 查询条件
	 * @return 库存记录
	 */
	public TWarehouseStock selectForUpdate(TWarehouseStock query);

	/**
	 * 查询库存列表
	 *
	 * @param tWarehouseStock 库存
	 * @return 库存集合
	 */
	public List<TWarehouseStock> selectTWarehouseStockList(TWarehouseStock tWarehouseStock);

	/**
	 * 新增库存
	 *
	 * @param tWarehouseStock 库存
	 * @return 结果
	 */
	public int insertTWarehouseStock(TWarehouseStock tWarehouseStock);

	/**
	 * 修改库存
	 *
	 * @param tWarehouseStock 库存
	 * @return 结果
	 */
	public int updateTWarehouseStock(TWarehouseStock tWarehouseStock);

	/**
	 * 删除库存
	 *
	 * @param id 库存主键
	 * @return 结果
	 */
	public int deleteTWarehouseStockById(Long id);

	/**
	 * 批量删除库存
	 *
	 * @param ids 需要删除的数据主键集合
	 * @return 结果
	 */
	public int deleteTWarehouseStockByIds(Long[] ids);
}
